<template>
    <div class="loading-component">
        <div class="main">
            <div class="loadEffect">
                <div v-for="n in 4" :key="n"><span></span></div>
            </div>
        </div>
    </div>
</template>

<script setup name="LoadingComponent">

</script>

<style scoped>
.loading-component {
    font-family: Arial, sans-serif;
}

.main {
    width: 100%;
    height: auto;
    padding-top: 100px;
}

a {
    display: block;
    text-align: center;
    font-size: 20px;
    margin-top: 200px;
}

.loadEffect {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    margin-top: 100px;
    position: relative;
}

.loadEffect div {
    width: 100%;
    height: 100%;
    position: absolute;
    animation: load 2.08s linear infinite;
}

.loadEffect div span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: lightgreen;
    position: absolute;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

@keyframes load {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(45deg);
    }

    50% {
        opacity: 1;
        transform: rotate(160deg);
    }

    62% {
        opacity: 0;
    }

    65% {
        opacity: 0;
        transform: rotate(200deg);
    }

    90% {
        transform: rotate(340deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loadEffect div:nth-child(1) {
    animation-delay: 0.2s;
}

.loadEffect div:nth-child(2) {
    animation-delay: 0.4s;
}

.loadEffect div:nth-child(3) {
    animation-delay: 0.6s;
}

.loadEffect div:nth-child(4) {
    animation-delay: 0.8s;
}

/* Demo Buttons Style */
.codrops-demos {
    font-size: 0.8em;
    text-align: center;
    position: absolute;
    z-index: 99;
    width: 96%;
}

.codrops-demos a {
    display: inline-block;
    margin: 0.35em 0.1em;
    padding: 0.5em 1.2em;
    outline: none;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border-radius: 2px;
    font-size: 110%;
    border: 2px solid transparent;
    color: #3366cc;
}

.codrops-demos a:hover,
.codrops-demos a.current-demo {
    border-color: #3366cc;
}
</style>
